// This interface is known by UI only and nessesary to create the model
package org.amse.ys.sndeditor.model;

import java.io.IOException;

public interface IEditor {
	// this class should be singleton

	// The public initiliser
	// public static IEditor initEditor() {return null;};
	// sets size of drawable area

	public abstract void setSize(int width, int height);

	// User interfaces
	public abstract void onMagnify(double timesToMagnify);

	public abstract void onScroll(double x);

	public abstract void onTouch(int posX, int posY, long time);

	public abstract int getTimerDelay();

	public abstract void onTimer();

	public abstract boolean onMenuItemSelected(int menuItem);

	// return false if form is active else form should be destroyed

	public abstract int getNumberOfApplets(); // Returns number of applets in
												// program

	public abstract String getAppletName(int appletNumber);

	public abstract void setActiveApplet(int numberOfApplet); // sets active
																// drawer

	public abstract int getNumberOfMenuOptions();

	public abstract String getMenuItemName(int numberOfItem);

	public abstract int getMenuItemIconIndex(int numberOfItem);

	public abstract IDrawer getDrawer();

	public abstract boolean isScreenChanged();

	public abstract void onDPadKeyPressed();

	// Called, when it is nesessary to open a new file
	public abstract void onOpenFile(String fileName) throws IOException;

	public abstract boolean fileIsOpened(String fileName);

	public abstract void reopenFile(String fileName) throws IOException;

}
